module dtos.dept;

class DeptDto
{
    long id;
    long parentId;
    string name;
    int sort;
    int status;
}

class DeptDtoForCreate
{
    long parentId;
    string name;
    int sort;
    int status;
}

class DeptDtoForUpdate
{
    long id;
    long parentId;
    string name;
    int sort;
    int status;
}

class TopDept
{
    long id;
    long parentId;
    string name;
    int sort;
    int status;
    SubDept[] children;

    this(long id, long parentId, string name, int sort, int status)
    {
        this.id = id;
        this.parentId = parentId;
        this.name = name;
        this.sort = sort;
        this.status = status;
    }

    this(long id, long parentId, string name, int sort, int status, SubDept[] children)
    {
        this.id = id;
        this.parentId = parentId;
        this.name = name;
        this.sort = sort;
        this.status = status;
        this.children = children;
    }
}

class SubDept
{
    long id;
    long parentId;
    string name;
    int sort;
    int status;
    this(long id, long parentId, string name, int sort, int status)
    {
        this.id = id;
        this.parentId = parentId;
        this.name = name;
        this.sort = sort;
        this.status = status;
    }
}

class TopDeptOption
{
    long value;
    string label;
    SubDeptOption[] children;

    this(long value, string label)
    {
        this.value = value;
        this.label = label;
    }

    this(long value, string label, SubDeptOption[] children)
    {
        this.value = value;
        this.label = label;
        this.children = children;
    }
}

class SubDeptOption
{
    long value;
    string label;

    this(long value, string label)
    {
        this.value = value;
        this.label = label;
    }
}
